<template>
  <div>
    <el-form-item label="最多选择">
      <el-select v-model="self0ptions.options.maxSelect" placeholder="请选择">
        <el-option
            v-for="item in dataArray"
            :key="item"
            :label="item"
            :value="item">
        </el-option>
      </el-select>
    </el-form-item>
  </div>
</template>
<script>
export default {
  name: "maxSelect-editor",
  props:{
    self0ptions:{
      type:Object,
    }
  },
  data(){
    return {
      dataArray:['不限','1项','2项']
    }
  },
  watch:{
    'self0ptions.options.radioConfig':{
      handler(val){
        const length = val.length;
        if(!length) return this.dataArray = ['不限']
        this.dataArray = this.dataArray.slice(0,1)
        for(let i = 1;i <= length;i++){
          this.dataArray.push(i+'项')
        }
      },
      deep: true
    }
  }
}
</script>
<style scoped lang="scss">

</style>